package TransactionImplementation

import (
	"SalaryPayment/AbstractTransaction"
	"SalaryPayment/DataBase"
	"SalaryPayment/Model"
	"SalaryPayment/ModelImplementation"
)

type ChangeMemberTransaction struct {
	AbstractTransaction.ChangeAffiliationTransaction
	itsDues     float64
	itsMemberId int
}

func (c *ChangeMemberTransaction) RecordMembership(employee *Model.Employee) {
	DataBase.PayrollDatabase.AddUnionMember(c.itsMemberId, employee)
}
func (c *ChangeMemberTransaction) GetAffiliation() Model.Affiliation {
	return ModelImplementation.NewUnionAffiliation(c.itsMemberId, c.itsDues)
}
